ifeq ($(CFG_SDK_EXPORT_FLAG),)
    ifneq ($(srctree),)
    KERNEL_DIR := $(srctree)
    SDK_DIR := $(shell cd $(KERNEL_DIR)/../../.. && /bin/pwd)
    else
    SDK_DIR := $(shell cd $(CURDIR)/../../../../.. && /bin/pwd)
    endif
endif

include $(SDK_DIR)/build/base.mk
include $(SDK_DIR)/source/gmp/modules/isp/arch.mk

ISP_ROOT := $(GMP_DIR)/modules/isp

MOD_NAME := $(CHIPARCH)_isp

SDK_KER_CFLAGS += -I$(GMP_DIR)/include \
		-I$(GMP_DIR)/modules/osal/include \
		-I$(ISP_ROOT)/kernel/mkp/include \
		-I$(ISP_ROOT)/kernel/arch/include \
		-I$(ISP_ROOT)/kernel/arch/$(CHIPARCH)/include \
		-I$(ISP_ROOT)/kernel/include/arch/$(CHIPARCH)/include \
		-I$(ISP_ROOT)/user/firmware/include \
		-I$(ISP_ROOT)/user/firmware/arch/$(CHIPARCH)/include \
		-I$(ISP_ROOT)/ext_inc

SRCS := ./init/linux/isp_init.c

SRCS += ./mkp/src/isp.c
SRCS += ./mkp/src/isp_st.c
SRCS += ./mkp/src/isp_drv_vreg.c
SRCS += ./mkp/src/isp_list.c

SRCS += ./arch/$(CHIPARCH)/hal/isp_drv.c

$(info $(SDK_KER_CFLAGS))

include $(SDK_DIR)/build/sdk_ko_rules.mk

